home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmToolTips
- BorderStyle = 1 'Fixed Single
- ClientHeight = 900
- ClientLeft = 1080
- ClientTop = 1650
- ClientWidth = 1725
- ControlBox = 0 'False
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "
- FontSize = 10.5
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 1275
- Left = 1035
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 900
- ScaleWidth = 1725
- Top = 1320
- Width = 1815
- Begin Timer tmrCounter
- Left = 1080
- Top = 120
- End
- '===================================================
- 'Sample VB program using UNLHA.DLL
- 'VBDeTip.Frm (frmToolTips)
- 'Original: Niiyama(HEROPA) SGV00153@niftyserve.or.jp
- 'English : Hitoshi Ozawa h_ozawa@bekkoame.or.jp
- '===================================================
- Option Explicit
- Dim intTimerCounter As Integer 'Timer Counter
- Sub Form_Load ()
- tmrCounter.Interval = 500 'just about right?
- intTimerCounter = 0
- Me.BackColor = glngColorWINDOW '&H80000005
- End Sub
- Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
- gintTiphWnd = 0 'tipIndex = -1
- gintParenthWnd = -1
- End Sub
- Sub tmrCounter_Timer ()
- Dim intReturnCode As Integer, pRect As tagRECT, pPoint As tagPoint
- If intTimerCounter = 1 Then
- If GetActiveWindow() <> gintParenthWnd% Then
- 'Stop main form from becoming active, when help menu is checked
- 'and tool button's MouseMove event is detected.
- Unload Me
- Exit Sub
- End If
- intReturnCode% = ShowWindow(Me.hWnd, SW_SHOWNA)
- intReturnCode% = SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_NOMOVE Or SWP_NOSIZE)
- intTimerCounter% = intTimerCounter% + 1
- Exit Sub
- End If
- intTimerCounter% = intTimerCounter% + 1
- If intTimerCounter% > 3 Then intTimerCounter% = 2
- GetWindowRect gintTiphWnd, pRect
- GetCursorPos pPoint
- If pPoint.x < pRect.Left Or pPoint.x > pRect.Right Or pPoint.y < pRect.Top Or pPoint.y > pRect.Bottom Then
- Unload Me
- End If
- End Sub
-